package com.ship.dispatch.service;

import com.ship.common.core.web.domain.JsonResult;
import com.ship.common.business.service.BaseService;
import com.ship.dispatch.bean.SpDispatchSchemeDetail;
import com.ship.dispatch.bean.SpYearPlanCapacityRecord;
import com.ship.dispatch.bean.SpYearPlanSchemeDetail;
import com.ship.dispatch.bo.*;
import com.ship.dispatch.model.SpDispatchSchemeSaveModel;
import com.ship.dispatch.model.dto.DispatchSchemeChartSaveDto;
import com.ship.dispatch.model.dto.SchemeChartSimpleDto;
import com.ship.dispatch.vo.ConResourceSellerVO;

import java.util.List;

/**
 * <p>
 * 方案详情 服务类
 * </p>
 *
 * @author AbyssRabbit@163.com
 * @since 2023-10-17
 */
public interface SpDispatchSchemeDetailService extends BaseService<SpDispatchSchemeDetail> {

    /**
     * 年度计划审批成功回执
     * @param planId
     * @return
     */
    JsonResult yearPlanSchemeApproveBack(String planId, Integer approveStatus);

    JsonResult schemeRollback(String schemeId);

    JsonResult<List<SpYearPlanSchemeDetail>> getSchemeDetailHistory(SchemeChartSimpleDto dto);

    /**
     * 调度详情编辑
     * @param dto
     * @return
     */
    JsonResult schemeDetailUpdate(SpDispatchSchemeDetailBO dto);

    /**
     * 调度详情删除
     * @param detailId
     * @return
     */
    JsonResult schemeDetailDelete(Long detailId,String reasonMsg);

    /**
     * 删除审批流程回调
     * @param businessKey
     * @return
     */
    void dataDeleteRollback(String businessKey,int status);

    /**
     * 新增调度
     * @param dto
     * @return
     */
    JsonResult schemeSave(SpDispatchSchemeSaveModel dto);

    /**
     * 修改年度计划计划装载量信息
     * @param dto
     * @return
     */
    JsonResult capacityUpdate(SpYearPlanCapacityRecord dto);

    JsonResult schemeChartSave(DispatchSchemeChartSaveDto dto);

    JsonResult schemeChartCalculateSave(DispatchSchemeChartSaveDto dto);

    List<ConResourceSellerVO> selectAllSellersByScheme();

    JsonResult contractUpdate();
}
